package com.xu.factory;

/**
 *
 * @author xudenghui
 * @create 2023-05-17 11:50
 **/
public class FactoryTest {
    public static void main(String[] args) {
        CashSuper cashNormal = CashFactory.CreateCashAccept("正常收费");
        System.out.println(cashNormal.acceptCash(300));
        CashSuper cashReturn = CashFactory.CreateCashAccept("满300返100");
        System.out.println(cashReturn.acceptCash(380));
        CashSuper cashRebate = CashFactory.CreateCashAccept("打八折");
        System.out.println(cashRebate.acceptCash(380));
    }
}
